home *** CD-ROM | disk | FTP | other *** search
/ Apple Macintosh CD: Power Macintosh 5200/75 / Apple Macintosh CD - Power Macintosh 5200_75.7z / Apple Macintosh CD - Power Macintosh 5200_75.bin / Extras / PowerTalk Extras / PowerTalk Mail Gateways / STF PowerFax™ PE Gateway / PowerFax™ PE Installer / STFApplications.sit / ARA Scripts / ZyXEL (LnMgr) < prev    next >
Text File  |  1994-07-11  |  3KB  |  204 lines

  1. ! "ZyXEL U-1496 and U-1496E"
  2. ! This script has been verified to work with Line Manager
  3. !
  4. @ORIGINATE
  5. @ANSWER
  6. !
  7. @LABEL 1
  8. serreset 19200, 0, 8, 1
  9. !
  10. ! first recall the factory configuration
  11. !
  12. matchclr
  13. matchstr 1 4 "OK\13\10"
  14. write "AT&F\13"
  15. matchread 30
  16. jump 59
  17. !
  18. ! Next, Set up the configuration:
  19. !
  20. @LABEL 4
  21. pause 5
  22. matchstr 1 6 "OK\13\10"
  23. ! &K0: No error control (default &K4)
  24. ! &M2: Direct async. mode (default &M0)
  25. ! &B0: DTE/DCE rate follows link rate (default &B1)
  26. ! X4 : Result code and call progress monitor option (default X5)
  27. ! S0=0: Turn off auto-answer
  28. ! E0: Turn off echo
  29. write "AT&K0&M2&B0X4S0=0E0 \13"
  30. matchread 30
  31. jump 59
  32. !
  33. ! If speaker on flag is true, jump to label 8. Else turn off speaker.
  34. @LABEL 6
  35. ifstr 2 8 "1"
  36. matchstr 1 8 "OK\13\10"
  37. write "ATM0\13"
  38. matchread 30
  39. jump 59
  40. !
  41. ! The modem is ready so enable answering, or originate a call
  42. !
  43. @LABEL 8
  44. pause 5
  45. ifANSWER 30
  46. note "Dialing ^1" 3
  47. write "ATDT^1\13"
  48. !
  49. @LABEL 9
  50. matchstr 1 11 "CONNECT 1200\13\10"
  51. matchstr 2 12 "CONNECT 2400\13\10"
  52. matchstr 3 13 "CONNECT 4800\13\10"
  53. matchstr 4 14 "CONNECT 7200\13\10"
  54. matchstr 5 15 "CONNECT 9600\13\10"
  55. matchstr 6 16 "CONNECT 12000\13\10"
  56. matchstr 7 17 "CONNECT 14400\13\10"
  57. matchstr 8 50 "NO CARRIER\13\10"
  58. matchstr 9 50 "ERROR\13\10"
  59. matchstr 10 52 "NO DIALTONE\13\10"
  60. matchstr 11 53 "BUSY\13\10"
  61. matchstr 12 54 "NO ANSWER\13\10"
  62. matchread 700
  63. jump 59
  64. !
  65. @LABEL 11
  66. note "Communicating at 1200 bps." 2
  67. setspeed 1200
  68. jump 20
  69. !
  70. @LABEL 12
  71. note "Communicating at 2400 bps." 2
  72. setspeed 2400
  73. jump 20
  74. !
  75. @LABEL 13
  76. note "Communicating at 4800 bps." 2
  77. setspeed 4800
  78. jump 20
  79. !
  80. @LABEL 14
  81. note "Communicating at 7200 bps." 2
  82. setspeed 7200
  83. jump 20
  84. !
  85. @LABEL 15
  86. note "Communicating at 9600 bps." 2
  87. setspeed 9600
  88. jump 20
  89. !
  90. @LABEL 16
  91. note "Communicating at 12000 bps." 2
  92. setspeed 12000
  93. jump 20
  94. !
  95. @LABEL 17
  96. note "Communicating at 14400 bps." 2
  97. setspeed 14400
  98. jump 20
  99. !
  100. ! Finished. Return with good results
  101. @LABEL 20  
  102. exit 0
  103. !
  104. ! @ANSWER
  105. ! Set up the modem to answer
  106. @LABEL 30
  107. write "ATS0=1\13"
  108. matchstr 1 31 "OK\13\10"
  109. matchread 30
  110. jump 59
  111. !
  112. @LABEL 31
  113. matchstr 1  32 "RING\13\10"
  114. matchstr 2  11 "CONNECT 1200\13\10"
  115. matchstr 3  12 "CONNECT 2400\13\10"
  116. matchstr 4  13 "CONNECT 4800\13\10"
  117. matchstr 5     14 "CONNECT 7200\13\10"
  118. matchstr 6  15 "CONNECT 9600\13\10"
  119. matchstr 7     16 "CONNECT 12000\13\10"
  120. matchstr 8  17 "CONNECT 14400\13\10"
  121. matchstr 9  50 "NO CARRIER\13\10"
  122. matchstr 10    50 "ERROR\13\10"
  123. matchstr 11    52 "NO DIALTONE\13\10"
  124. matchstr 12    53 "BUSY\13\10"
  125. matchstr 13 54 "NO ANSWER\13\10"
  126. matchread 700
  127. jump 31
  128. !
  129. @LABEL 32
  130. userhook 1
  131. note "Answering phone…" 2
  132. jump 31
  133. !
  134. ! 50: error messages
  135. !
  136. @LABEL 50
  137. exit -6021
  138. !
  139. @LABEL 52
  140. exit -6020
  141. !
  142. @LABEL 53
  143. exit -6022
  144. !
  145. @LABEL 54
  146. exit -6023
  147. !
  148. @LABEL 59
  149. exit -6019
  150. !
  151. @LABEL 70
  152. setspeed 19200
  153. jump 71
  154. !
  155. ! Hang up the modem
  156. !
  157. @HANGUP
  158. @LABEL 60
  159. settries 0
  160. HSReset 0 0 0 0 0 0 
  161. @LABEL 61
  162. write "ATH\13"
  163. matchclr
  164. matchstr 1 62 "NO CARRIER\13\10"
  165. matchstr 2 62 "OK\13\10"
  166. matchstr 3 62 "ERROR\13\10"
  167. matchread 30
  168. inctries
  169. iftries 3 59
  170. iftries 2 70
  171. !
  172. @LABEL 71
  173. ! no response, try escape sequence
  174. pause 12
  175. write "+++"
  176. matchclr
  177. matchstr 1 61 "OK\13\10"
  178. matchread 18
  179. ! try dropping DTR
  180. DTRClear
  181. pause 15
  182. DTRSet
  183. pause 15
  184. jump 61
  185. !
  186. @LABEL 62
  187. ! recall the factory settings
  188. pause 15
  189. write "AT&F\13"
  190. matchclr
  191. matchstr 1 63 "OK\13\10"
  192. matchread 30
  193. !
  194. @LABEL 63
  195. pause 5
  196. matchstr 1 64 "OK\13\10"
  197. write "ATS0=0\13"
  198. matchread 20
  199. !
  200. @LABEL 64
  201. exit 0
  202.  
  203.